Command-Line Options

Contents|Index|Previous|Next
Command-line options

The following documentation describes command-line options available in all versions of the GNU assembler; see also Machine dependent features for options specific to particular machine architectures.

- Enable listings: -a[dhlns]
- -D
- Work faster: -f
- .include search path: -I path
- Difference tables: -K
- Include local labels: -L
- Assemble in MRI compatibility mode: -M
- Name the object file: -o
- Join data and text sections: -R
- Display assembly statistics: --statistics
- Announce version: -v
- Suppress warnings: -W
- Generate object file in spite of errors: -Z

If you are invoking as using the GNU C compiler (version 2), you can use the -Wa option to pass arguments through to the assembler. The assembler arguments must be separated from each other (and the -Wa) by commas. Use the following for example.

gcc -c -g -O -Wa,-alh,-L file.c

This input emits a listing to standard output with high-level and assembly source.

Usually you do not need to use the -Wa mechanism, since many compiler command-line options are automatically passed to the assembler by the compiler. (You can call the GNU compiler driver with the -v option to see precisely what options it passes to each compilation pass, including the assembler.)

Top|Contents|Index|Previous|Next